home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / share / perl5 / GnuPG / SubKey.pm < prev    next >
Encoding:
Perl POD Document  |  2010-05-10  |  2.3 KB  |  109 lines

  1. #  SubKey.pm
  2. #    - providing an object-oriented approach to GnuPG sub keys
  3. #
  4. #  Copyright (C) 2000 Frank J. Tobin <ftobin@cpan.org>
  5. #
  6. #  This module is free software; you can redistribute it and/or modify it
  7. #  under the same terms as Perl itself.
  8. #
  9. #  This program is distributed in the hope that it will be useful,
  10. #  but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  12. #
  13. #  $Id: SubKey.pm,v 1.9 2001/09/14 12:34:36 ftobin Exp $
  14. #
  15.  
  16. package GnuPG::SubKey;
  17. use Any::Moose;
  18. use Carp;
  19. BEGIN { extends qw( GnuPG::Key ) }
  20.  
  21. has [qw( validity   owner_trust  local_id  )] => (
  22.     isa => 'Any',
  23.     is  => 'rw',
  24. );
  25.  
  26. # DEPRECATED!
  27. # return the last signature, if present.  Or push in a new signature,
  28. # if one is supplied.
  29. sub signature {
  30.   my $self = shift;
  31.   my $argcount = @_;
  32.  
  33.   if ($argcount) {
  34.     @{$self->signatures} = ();
  35.     $self->push_signatures(@_);
  36.   } else {
  37.     my $sigcount = @{$self->signatures};
  38.     if ($sigcount) {
  39.       return $self->signatures->[$sigcount-1];
  40.     } else {
  41.       return undef;
  42.     }
  43.   }
  44. }
  45.  
  46. __PACKAGE__->meta->make_immutable;
  47.  
  48. 1;
  49.  
  50. __END__
  51.  
  52. =head1 NAME
  53.  
  54. GnuPG::SubKey - GnuPG Sub Key objects
  55.  
  56. =head1 SYNOPSIS
  57.  
  58.   # assumes a GnuPG::PublicKey object in $key
  59.   my @subkeys = $key->subkeys();
  60.  
  61.   # now GnuPG::SubKey objects are in @subkeys
  62.  
  63. =head1 DESCRIPTION
  64.  
  65. GnuPG::SubKey objects are generally instantiated
  66. through various methods of GnuPG::Interface.
  67. They embody various aspects of a GnuPG sub key.
  68.  
  69. This package inherits data members and object methods
  70. from GnuPG::Key, which are not described here, but rather
  71. in L<GnuPG::Key>.
  72.  
  73. =head1 OBJECT DATA MEMBERS
  74.  
  75. =over 4
  76.  
  77. =item validity
  78.  
  79. A scalar holding the value GnuPG reports for the trust of authenticity
  80. (a.k.a.) validity of a key.
  81. See GnuPG's DETAILS file for details.
  82.  
  83. =item local_id
  84.  
  85. GnuPG's local id for the key.
  86.  
  87. =item owner_trust
  88.  
  89. The scalar value GnuPG reports as the ownertrust for this key.
  90. See GnuPG's DETAILS file for details.
  91.  
  92. =item signature
  93.  
  94. * DEPRECATED*
  95.  
  96. A GnuPG::Signature object holding the representation of the signature
  97. on this key.  Please use signatures (see L<GnuPG::Key>) instead of
  98. signature.  Using signature, you will get an arbitrary signature from
  99. the set of available signatures.
  100.  
  101. =back
  102.  
  103. =head1 SEE ALSO
  104.  
  105. L<GnuPG::Key>,
  106. L<GnuPG::Signature>,
  107.  
  108. =cut
  109.